<?php
class PieChart extends CWidget
{
	public $postParams=array();
	public $config=array();
	
	public function run()
  	{?>
  	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
  <script type="text/javascript">
    google.load('visualization', '1', {packages: ['corechart']});
    var visualization;

    function draw() {
      drawVisualization();
      drawToolbar();
    }

    function drawVisualization() {
      var container = document.getElementById('visualization_div');
      visualization = new google.visualization.PieChart(container);
      new google.visualization.Query('https://spreadsheets.google.com/tq?key=pCQbetd-CptHnwJEfo8tALA').
          send(queryCallback);
    }

    function queryCallback(response) {
      visualization.draw(response.getDataTable(), {is3D: true});
    }

    google.setOnLoadCallback(draw);
  </script>
 <div>
	<div>
		<h2 class="mod_title helv_black" style="color:#333;">My Statistics</h2>  
	</div>
	<div class="mt15">
		<div class="fl ml40 mt20"><div id="visualization_div" style="width: 270px; height: 200px;"></div></div>
		<div class="fl pichart ml30">
			<div>
				<div class="r_ball1 fl"></div><div class="helc ml5 fl fnt14">YC Registration</div>
				<div class="cl"></div>
			</div>
			<div class="mt7">
				<div class="y_ball1 fl"></div><div class="helc ml5 fl fnt14">XY Registration</div>
				<div class="cl"></div>
			</div>
			<div class="mt7">
				<div class="b_ball1 fl"></div><div class="helc ml5 fl fnt14">Videos Viewed</div>
				<div class="cl"></div>
			</div>
			<div class="mt7">
				<div class="g_ball1 fl"></div><div class="helc ml5 fl fnt14">Share</div>
				<div class="cl"></div>
			</div>
			<div class="cl"></div>
		</div>
		<div class="cl"></div>
	</div>
</div>
<?php }
}
?>   	